<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<h:head>
	<title>Defeitos</title>
</h:head>
<h:body>
		<h2 style="text-align: center">Defeitos</h2>
			<div align="center">
			<h:form>
			<h:panelGrid columnClasses="acent">
				<rich:extendedDataTable id="chamados" 
					value="#{chamado.tabelaChamadosOpen}" var="chamado1">
					<h:column>
						<f:facet name="header">
							<h:outputText value="ID" />
						</f:facet>
						<h:outputText value="#{chamado1.id}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="ABERTURA" />
						</f:facet>
						<h:outputText value="#{chamado1.abertura}">
							<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
						</h:outputText>
					</h:column>
					<h:column>
						<f:facet name="header" >
							<h:outputText value="FECHAMENTO" />
						</f:facet>
						<rich:calendar name="Calendar" id="CalendarClose"
							value="#{chamado.fechamento}" size="10"
							timeZone="#{dWRFD1Handler.timeZone}" mode="ajax"
							datePattern="dd.MM.yyyy">
						</rich:calendar>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="DESCRIÇÂO" />
						</f:facet>
						<h:outputText value="#{chamado1.descricao}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="MAQUINA" />
						</f:facet>
						<h:outputText value="#{chamado1.maquina.nome}">
						</h:outputText>
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="FUNCIONARIO" />
						</f:facet>
						<h:outputText value="#{chamado1.funcionario.nome}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="DEFEITO" />
						</f:facet>
						<h:outputText value="#{chamado1.tipoDefeito.nome}" />
					</h:column>
					<h:column align="center">
						<f:facet name="header">
							<h:outputText value="FECHAR" />
						</f:facet>
						<a4j:commandButton action="#{chamado.alteraAction}" value="Fechar">
							<f:setPropertyActionListener value="#{chamado1.id}"
								target="#{chamado.idChamado}" />
						</a4j:commandButton>
					</h:column>
				</rich:extendedDataTable>
				</h:panelGrid>
			</h:form>
		<h:outputLink value="index.xhtml">
			<f:verbatim>Voltar</f:verbatim>
		</h:outputLink>
	</div>
</h:body>

</html>